import createAxios from '/@/utils/axios'


export const controllerUrl = '/system/business.Business/'

// 导出订单数据
export function exportOrderApi(data: anyObj){
    return createAxios({
        url: controllerUrl + 'exportOrder',
        method: 'post',
        data
    },{
        showSuccessMessage: true
    })
}

// 设置状态
export function setStatusApi(data: anyObj){
    return createAxios({
        url: controllerUrl + 'setStatus',
        method: 'post',
        data
    },{
        showSuccessMessage: true
    })
}

// 设置报价单
export function setQuotationFileApi(data: anyObj){
    return createAxios({
        url: controllerUrl + 'setQuotationFile',
        method: 'post',
        data
    },{
        showSuccessMessage: true
    })
}

// 设置产品说明
export function setInfoApi(data: anyObj){
    return createAxios({
        url: controllerUrl + 'setInfo',
        method: 'post',
        data
    },{
        showSuccessMessage: true
    })
}

// 添加备注
export function addNoteApi(data: anyObj){
    return createAxios({
        url: controllerUrl + 'addNote',
        method: 'post',
        data
    },{
        showSuccessMessage: true
    })
}
// 删除报价单
export function delQuotationFileApi(id: number){
    return createAxios({
        url: controllerUrl + 'delQuotationFile',
        method: 'get',
        params: {
            id: id,
        }
    },{
        showSuccessMessage: true
    })
}

// 删除备注
export function delNoteApi(id: number){
    return createAxios({
        url: controllerUrl + 'delNote',
        method: 'get',
        params: {
            id: id,
        }
    },{
        showSuccessMessage: true
    })
}

// 隐藏报价
export function hideQuotationApi(id: number){
    return createAxios({
        url: controllerUrl + 'hideQuotation',
        method: 'get',
        params: {
            id: id,
        }
    },{
        showSuccessMessage: true
    })
}
// 显示报价
export function showQuotationApi(id: number){
    return createAxios({
        url: controllerUrl + 'showQuotation',
        method: 'get',
        params: {
            id: id,
        }
    },{
        showSuccessMessage: true
    })
}


// 修改订单商品的尺码
export function updateSizeApi(data: anyObj) {
    return createAxios(
        {
            url: controllerUrl + 'updateSize',
            method: 'post',
            data: data,
        },
        {
            showSuccessMessage: true,
        }
    )
}


// 修改订单商品的颜色
export function updateColorApi(data: anyObj) {
    return createAxios(
        {
            url: controllerUrl + 'updateColor',
            method: 'post',
            data: data,
        },
        {
            showSuccessMessage: true,
        }
    )
}


// 修改订单商品的dc价格
export function updatePurchasePriceApi(data: anyObj) {
    return createAxios(
        {
            url: controllerUrl + 'updatePurchasePrice',
            method: 'post',
            data: data,
        },
        {
            showSuccessMessage: true,
        }
    )
}

// 修改订单商品的数量
export function updateOrderNumApi(data: anyObj) {
    return createAxios(
        {
            url: controllerUrl + 'updateOrderNum',
            method: 'post',
            data: data,
        },
        {
            showSuccessMessage: true,
        }
    )
}



// 撤回出货状态
export function withdrawStatusApi(order_goods_id: number){
    return createAxios({
        url: controllerUrl + 'withdrawStatus',
        method: 'get',
        params: {
            order_goods_id: order_goods_id,
        }
    },{
        showSuccessMessage: true
    })
}


// 更新出货状态
export function updateStatusApi(data: anyObj){
    return createAxios({
        url: controllerUrl + 'updateStatus',
        method: 'post',
        data
    },{
        showSuccessMessage: true
    })
}

